<?php

namespace Phpben\Imi\ModuleRoute\Listener;

use Imi\App;
use Imi\Event\EventParam;
use Imi\Event\IEventListener;
use Imi\Bean\Annotation\Listener;
use Phpben\Imi\ModuleRoute\Route;

/**
 * @Listener("IMI.APP_RUN")
 */
class AppRunListener implements IEventListener
{
    /**
     * 重新绑定HttpRoute
     * @param EventParam $e
     * @return void
     */
    public function handle(EventParam $e): void
    {
        App::getContainer()->bind('HttpRoute', Route::class);
    }

}